# vim: filetype=yaml sw=2
version: '[% c("abbrev") %]'
filename: 'geckoview-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.[% c("compress_tar") %]'
git_hash: 'tor-browser-[% c("var/geckoview_version") %]-[% c("var/browser_branch") %]-build[% c("var/browser_build") %]'
tag_gpg_id: 1
git_url: https://gitlab.torproject.org/tpo/applications/tor-browser.git
gpg_keyring:
  - boklm.gpg
  - dan_b.gpg
  - ma1.gpg
  - pierov.gpg
  - richard.gpg
container:
  use_container: 1

var:
  geckoview_version: 115.3.1esr
  browser_branch: 13.0-1
  browser_build: 2
  copyright_year: '[% exec("git show -s --format=%ci").remove("-.*") %]'
  gitlab_project: https://gitlab.torproject.org/tpo/applications/tor-browser
  git_commit: '[% exec("git rev-parse HEAD") %]'
  deps:
    - build-essential
    - autoconf
    - yasm
    - python3
    - python3-distutils
    - pkg-config
    - openjdk-11-jdk-headless
  # this should be updated when the list of gradle dependencies is changed
  # see doc/how-to-create-gradle-dependencies-list.txt
  gradle_dependencies_version: 12
  gradle_version: 7.5.1
  variant: beta

targets:
  release:
    var:
      variant: release
  nightly:
    git_hash: 'tor-browser-[% c("var/geckoview_version") %]-[% c("var/browser_branch") %]'
    tag_gpg_id: 0
    var:
      variant: nightly

steps:
  merge_aars:
    filename: 'geckoview-[% c("version") %]-[% c("var/build_id") %].tar.[% c("compress_tar") %]'
    version: '[% c("abbrev") %]'
    merge_aars: '[% INCLUDE merge_aars %]'
    input_files:
      - project: container-image
        pkg_type: build
      - name: '[% c("var/compiler") %]'
        project: '[% c("var/compiler") %]'
        pkg_type: build
      - project: gradle
        name: gradle
        pkg_type: build
      - project: node
        name: node
        pkg_type: build
      - filename: 'gradle-dependencies-[% c("var/gradle_dependencies_version") %]'
        name: gradle-dependencies
        exec: '[% INCLUDE "fetch-gradle-dependencies" %]'
      - name: geckoview_armv7
        project: geckoview
        pkg_type: build
        target_prepend:
          - torbrowser-android-armv7
      - name: geckoview_aarch64
        project: geckoview
        pkg_type: build
        target_prepend:
          - torbrowser-android-aarch64
      - name: geckoview_x86
        project: geckoview
        pkg_type: build
        target_prepend:
          - torbrowser-android-x86
      - name: geckoview_x86_64
        project: geckoview
        pkg_type: build
        target_prepend:
          - torbrowser-android-x86_64

  list_toolchain_updates:
    git_url: https://github.com/mozilla/gecko-dev.git
    git_hash: esr115
    tag_gpg_id: 0
    input_files: []
    container:
      use_container: 0

input_files:
  - project: container-image
  - name: '[% c("var/compiler") %]'
    project: '[% c("var/compiler") %]'
  - project: gradle
    name: gradle
  - project: binutils
    name: binutils
  - project: rust
    name: rust
  - project: cbindgen
    name: cbindgen
  - project: node
    name: node
  - project: nasm
    name: nasm
  - project: clang
    name: clang
  - project: llvm-runtimes
    name: llvm-runtimes
  - project: wasi-sysroot
    name: wasi-sysroot
    enable: '[% c("var/rlbox") %]'
  - filename: 'gradle-dependencies-[% c("var/gradle_dependencies_version") %]'
    name: gradle-dependencies
    exec: '[% INCLUDE "fetch-gradle-dependencies" %]'
